package com.example.finalwork06.Mapper;

import com.example.finalwork06.Entity.SectorCapitalFlows;
import com.example.finalwork06.Entity.SecuritiesAlerts;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SecuritiesAlertsMapper {
    @Select("SELECT * FROM SECURITIES_ALERTS ORDER BY ID DESC")
    public List<SecuritiesAlerts> selectAll();

    @Insert("INSERT INTO SECURITIES_ALERTS(SATITLE,SATIME,STATUS) VALUES(#{saTitle},#{saTime},#{status})")
    public void insertSecuritiesAlerts(SecuritiesAlerts securitiesAlerts);

    @Select("select count(*) FROM SECURITIES_ALERTS WHERE SATITLE=#{title}")
    public boolean selectByName(String title);

}